#include <iostream>
#include <list>
#include <vector>
#include <algorithm>
using namespace std;

#include "Stack.h"
#include "Queue.h"

namespace ouyang
{
	void Text_stack()
	{
		stack<int> st;
		st.push(1);
		st.push(2);
		st.push(3);
		st.push(4);
		cout << "first_size:" << st.size() << endl;
		while (!st.empty())
		{
			cout << st.top() << " ";
			st.pop();
		}
		cout << endl;
		cout << "last_size:" << st.size() << endl;
	}


	void Text_queue()
	{
		queue<int> q;
		q.push(1);
		q.push(2);
		q.push(3);
		q.push(4);
		cout << "first_size:" << q.size() << endl;
		cout << "back:" << q.back() << endl;
		while (!q.empty())
		{
			cout << q.front() << " ";
			q.pop();
		}
		cout << endl;
		cout << "last_size:" << q.size() << endl;
	}
}

int main()
{
	ouyang::Text_stack();
	cout << endl;
	ouyang::Text_queue();

	return 0;
}